﻿<html>
<head>
<style type="text/css">
<!--
img {   

}   
-->
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#button").click(function(){
      var value= $("#value").val();
	  var size = $("#size").val();
	  var errlv =$("#errlv").val();
	  if( value=="" ){
	/**/	alert("请输入内容～");
	  }
	  else
 if( errlv!="Q"&&errlv!="L"&&errlv!="M"&&errlv!="H"){
	        alert("参数不正确!")	 
	  }else 
	    if(size!="1"&&size!="2"&&size!="3"&&size!="4"&&size!="5"&&size!="6"&&size!="7"&&size!="8"&&size!="9"&&size!="10"&&size!="11"&&size!="12"){
		 alert("参数不正确!")	
	  }else
	  { 
		$("#qr").attr("src","qr.php?value="+value+"&size="+size+"&errlv="+errlv );
	  }
  });
});
</script>
</head>

<body>
    <div style=" margin:0 auto; width:800px; height:800px">
	<div  style=" width:400px; height:400px ; border:4px  solid red; float:right; text-align:center;">
	  <p><img src="qr.php?value=http://weibo.com/10832126" id="qr" /></p>
	  </div>
	  <div style=" width:300px; height:300px ;float:right">
	请输入内容  <input type="text" id="value" /><br />
	请选择容错率 <select  id="errlv" >     
      <option value="L">恢复%7</option>
      <option value="M">恢复%15</option>
      <option value="Q">恢复%25</option>
      <option value="H">恢复%30</option>
     </select> <br />
	请选择尺码 <select id="size" > <br/>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
	  <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
      <option value="8">8</option>
	  <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
     </select><br/>

	 <input id="button" type="submit" value="生成" />
	 </div>
 </div>
</body>
</html> 
